﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace ArmyAnt.EntityFrameworkCore.Migrations
{
    public partial class 测试数据库小写 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_Users",
                table: "Users");

            migrationBuilder.DropPrimaryKey(
                name: "PK_Roles",
                table: "Roles");

            migrationBuilder.RenameTable(
                name: "Users",
                newName: "users");

            migrationBuilder.RenameTable(
                name: "Roles",
                newName: "roles");

            migrationBuilder.RenameColumn(
                name: "Usersname",
                table: "users",
                newName: "usersname");

            migrationBuilder.RenameColumn(
                name: "UpdatedTime",
                table: "users",
                newName: "updatedtime");

            migrationBuilder.RenameColumn(
                name: "Remarks",
                table: "users",
                newName: "remarks");

            migrationBuilder.RenameColumn(
                name: "Password",
                table: "users",
                newName: "password");

            migrationBuilder.RenameColumn(
                name: "IsDeleted",
                table: "users",
                newName: "isdeleted");

            migrationBuilder.RenameColumn(
                name: "IsActived",
                table: "users",
                newName: "isactived");

            migrationBuilder.RenameColumn(
                name: "DisplayOrder",
                table: "users",
                newName: "displayorder");

            migrationBuilder.RenameColumn(
                name: "CreatedTime",
                table: "users",
                newName: "createdtime");

            migrationBuilder.RenameColumn(
                name: "Id",
                table: "users",
                newName: "id");

            migrationBuilder.RenameColumn(
                name: "UpdatedTime",
                table: "roles",
                newName: "updatedtime");

            migrationBuilder.RenameColumn(
                name: "RoleName",
                table: "roles",
                newName: "rolename");

            migrationBuilder.RenameColumn(
                name: "Remarks",
                table: "roles",
                newName: "remarks");

            migrationBuilder.RenameColumn(
                name: "IsDeleted",
                table: "roles",
                newName: "isdeleted");

            migrationBuilder.RenameColumn(
                name: "IsActived",
                table: "roles",
                newName: "isactived");

            migrationBuilder.RenameColumn(
                name: "DisplayOrder",
                table: "roles",
                newName: "displayorder");

            migrationBuilder.RenameColumn(
                name: "CreatedTime",
                table: "roles",
                newName: "createdtime");

            migrationBuilder.RenameColumn(
                name: "Id",
                table: "roles",
                newName: "id");

            migrationBuilder.AddPrimaryKey(
                name: "PK_users",
                table: "users",
                column: "id");

            migrationBuilder.AddPrimaryKey(
                name: "PK_roles",
                table: "roles",
                column: "id");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_users",
                table: "users");

            migrationBuilder.DropPrimaryKey(
                name: "PK_roles",
                table: "roles");

            migrationBuilder.RenameTable(
                name: "users",
                newName: "Users");

            migrationBuilder.RenameTable(
                name: "roles",
                newName: "Roles");

            migrationBuilder.RenameColumn(
                name: "usersname",
                table: "Users",
                newName: "Usersname");

            migrationBuilder.RenameColumn(
                name: "updatedtime",
                table: "Users",
                newName: "UpdatedTime");

            migrationBuilder.RenameColumn(
                name: "remarks",
                table: "Users",
                newName: "Remarks");

            migrationBuilder.RenameColumn(
                name: "password",
                table: "Users",
                newName: "Password");

            migrationBuilder.RenameColumn(
                name: "isdeleted",
                table: "Users",
                newName: "IsDeleted");

            migrationBuilder.RenameColumn(
                name: "isactived",
                table: "Users",
                newName: "IsActived");

            migrationBuilder.RenameColumn(
                name: "displayorder",
                table: "Users",
                newName: "DisplayOrder");

            migrationBuilder.RenameColumn(
                name: "createdtime",
                table: "Users",
                newName: "CreatedTime");

            migrationBuilder.RenameColumn(
                name: "id",
                table: "Users",
                newName: "Id");

            migrationBuilder.RenameColumn(
                name: "updatedtime",
                table: "Roles",
                newName: "UpdatedTime");

            migrationBuilder.RenameColumn(
                name: "rolename",
                table: "Roles",
                newName: "RoleName");

            migrationBuilder.RenameColumn(
                name: "remarks",
                table: "Roles",
                newName: "Remarks");

            migrationBuilder.RenameColumn(
                name: "isdeleted",
                table: "Roles",
                newName: "IsDeleted");

            migrationBuilder.RenameColumn(
                name: "isactived",
                table: "Roles",
                newName: "IsActived");

            migrationBuilder.RenameColumn(
                name: "displayorder",
                table: "Roles",
                newName: "DisplayOrder");

            migrationBuilder.RenameColumn(
                name: "createdtime",
                table: "Roles",
                newName: "CreatedTime");

            migrationBuilder.RenameColumn(
                name: "id",
                table: "Roles",
                newName: "Id");

            migrationBuilder.AddPrimaryKey(
                name: "PK_Users",
                table: "Users",
                column: "Id");

            migrationBuilder.AddPrimaryKey(
                name: "PK_Roles",
                table: "Roles",
                column: "Id");
        }
    }
}
